package com.ts.content.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ts.content.entity.DiscussEntity;
import com.ts.content.entity.PostEntity;
import com.ts.content.service.DiscussService;
import com.ts.content.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/post")
public class PostController {

    @Autowired
    private PostService postService;

    @PostMapping("/page")
    public Page<PostEntity> page(@RequestBody Page<PostEntity> page){
        return postService.page(page);
    }
}
